package billing

import (
	"context"

	"gitee.com/spume/common_service/app/billing/api/billing/v1"
	"gitee.com/spume/common_service/app/billing/internal/service"
)

func (c *ControllerV1) BillingCreateBatch(ctx context.Context, req *v1.BillingCreateBatchReq) (res *v1.BillingCreateBatchRes, err error) {
	res = &v1.BillingCreateBatchRes{}
	res.BillIds, err = service.Billing().CreateWith(ctx, req.TenantId, req.Billings...)
	return
}
